const path = require('path');
var webpack = require('webpack');

var config = {
  // 页面入口文件配置
  entry: [
    './app.js'
  ],
  // 页面出口文件配置
  output: {
    path: path.resolve(__dirname, './build'),// 最终生成文件的目录
    filename: 'bundle.js'
  },
  module: {
    // 加载器配置
    loaders: [
      {test: /\.css$/, loader: 'style-loader!css-loader' },
      {test: /\.(gif|png|jpg|woff|svg|eot|ttf)\??.*$/, loader: 'url-loader?limit=100&name=resource/[name].[ext]'},//小于100会以base64格式打包到文件里，大于100会单独文件
      {test: /\.scss$/, loader: 'style-loader!css-loader!sass-loader'},
    ]
  }
};

module.exports = config;

